package com.zhao.dota.vo;

import cn.hutool.core.bean.BeanUtil;
import com.zhao.dota.contant.TeamConst;
import com.zhao.dota.model.LeagueMatchUser;
import com.zhao.dota.util.SteamUtil;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
public class UserHeroVo {

    private Integer leagueMatchId;

    private TeamConst team;

    private Integer userId;

    private String userName;

    private String avatar;

    private Integer heroId;

    private String heroName;

    private String heroLocalizedName;

    private String heroAvatar;

    private boolean dbl;

    public UserHeroVo(LeagueMatchUser user) {
        BeanUtil.copyProperties(user, this);
        this.heroAvatar = SteamUtil.getIconUrlByHeroName(user.getHeroName());
    }

}
